OPERATING INSTRUCTIONS FOR 3-DEM RAYTRACE SOFTWARE (Version 1.4) CONCEPT OF OPERATION 3-DEM will produce ray traced landscape scenes from USGS Digital Elevation Model (DEM) files and from NASA Mars Digital Topographic Map (DTM) files. 3-DEM can produce either standard shaded three dimensional projections or red-blue projections which require the use of red-blue 3D glasses for viewing. Completed scenes may be saved as Windows bitmaps for transfer to other applications. EQUIPMENT REQUIRED 3-DEM is designed to run under Windows 3.1 with 256 color graphics. 3-DEM also runs well under Windows 95. A 486 or better microprocessor and math co processor are recommended. You won't be happy with the program's speed if you use anything less than this. At least 8 MBytes of memory is REQUIRED. And if you can afford 16 MBytes, it will significantly improve performance on large DEM files. SEQUENCE OF OPERATIONS To produce a three dimensional scene you must perform four operations in sequence with the 3-DEM software as follows: STEP 1 - Load a new DEM or DTM file and draw an overhead map of scaled altitude data. Choose "New DEM" or "New DTM" from the "File" menu and select the file to be loaded into 3-DEM. If the file is of the correct type, 3-DEM will then draw an overhead map of the entire geographical area with color scaled to the altitude at each point on the map. STEP 2 - Choose an area from the overhead map for conversion into a three dimensional scene. Click the left mouse button at the location on the overhead map which interests you. The area to be converted will be outlined by a black rectangle. The observer's location and direction of view are indicated by a notch in one side of the outline rectangle. Move the outline rectangle while holding down the left mouse button. Rotate the outline rectangle while holding down the right mouse button and moving the mouse left or right at the bottom of the display window. You can also make fine adjustments to the rotation of the outline rectangle using the left and right arrow keys. Choose "1x" or "4x" from the "Area" menu to select the size of the scene. Choose "Show Scale" from the "Scale" menu to display an indication of the horizontal and vertical scale (in kilometers) of the selected area. STEP 3 - Compute and display a three dimensional wireframe preview of the area selected from the overhead map. You can choose a preview projection with or without the use of red-blue lens 3D glasses for viewing. Choose "Wireframe Preview" and either "Red/Blue" or "Single View" preview from the "Operation" menu and a dialog box will appear giving you selection of the detailed parameters required for the three dimensional projection. Each of these selections is described in the following paragraph entitled "Projection Parameters." Initially however, you should accept the default values by clicking the "OK" button. 3-DEM will then draw the three dimensional wireframe preview. If you are not satisfied with the view, go may back to the "Overhead Map" and adjust the outline rectangle position or rotation. Or you may adjust any of the projection parameters by choosing "Wireframe Preview" again from the Operation Menu. STEP 4 - Once you are satisfied with the wireframe preview, compute and display a three dimensional ray-traced image of the selected geographical area. Your ray traced image may be a red-blue projection requiring 3D glasses or individual projections from center, left eye, or right eye viewpoints. Choose "3D Ray Trace" and either "Red/Blue", "Single View, Center", "Single View, Left", or "Single View, Right" from the "Operation" menu and 3-DEM will then compute the selected ray-traced projection. Depending on the size of the scene and the speed of your computer, this operation can take from 3 minutes to an hour. Relax and be patient. Once the ray-tracing is complete, you may save the image as a windows bitmap by choosing "Save BMP" from the File menu. PROJECTION PARAMETERS Before 3-DEM computes a wireframe preview, you will be presented with a dialog box for selection of detailed display parameters. Each of these parameters is described here. LEGEND - The Legend is text which will appear at the top of your finished three dimensional scene. Initially, this legend is read from the DEM file header. Adjust the text to your own preference. SCENE TILT - The scene can be tilted to the observer's line of sight by a value of 0 to 45 degrees. A tilt of 0 indicates that the observer's line of sight is parallel to the base of the scene. The default value of 26 degrees usually gives a suitable result for a foreground projection. Use a smaller value (12 to 16 degrees) for a background projection. See the description of foreground and background projections which follows. VERT MAGNIFICATION - Large scale DEMs and DTMs often show very low relief features. Vertical magnification increases the height of surface features to make them more visible in the three dimensional projection. Don't hesitate to use magnifications of 200% to 300% or more to improve the appearance of your scene. The default value of vertical magnification is 100%, but you should change this value if you are not satisfied with the appearance of the wireframe preview. VERT SHIFT - Occasionally, you may wish to shift the vertical position of your projection on the screen to obtain the best scene. Enter the number of screen lines to be shifted, where positive values shift the image toward the top of the window, and negative values shift the image toward the bottom. Normally you will not need to change vertical shift from a value of zero. However, this control gives you the flexibility to do so if needed. ILLUMINATION - The three dimensional ray tracing is computed using one source of illumination at the azimuth and elevation angles chosen here. These directions are relative to the observer at all times. Zero degrees azimuth indicates a source directly in front of the observer, while 180 degrees azimuth indicates a source directly behind the observer. Zero degrees elevation indicates a source on the horizon, while 90 degrees elevation indicates a source directly overhead. Thus the default values of 240 degrees azimuth and 60 degrees elevation indicate an illumination source over the left shoulder of the observer. Experiment with these values if you find a need to change the appearance of light and shadow in your three dimensional projection. TERRAIN - Normally, terrain is a combination of mountains and plains with lighting determined by the azimuth and elevation of the illumination source. However, if you are developing a scene containing the ocean's surface, you may want the ocean to appear uniformly dark rather than appear as a brightly lighted plane. Choose "Mountain and Plain" for normal scenery, or "Island and Ocean" for scenery including the ocean's surface. LENS SELECTION - There is no standard arrangement for the red and blue lens of 3D glasses. Some glasses have the red lens on the right, some on the left. Choose "Red/Blue" for red over the left eye or "Blue/Red" for red over the right eye. PROJECTION - "Foreground" and "Background" options are provided for the three dimensional projection. A foreground projection is centered at the surface of your CRT screen and projects into the space in front of the screen, giving an image that you can literally reach out and touch. A background projection is a more conventional projection behind the surface of your CRT screen and is more suitable for large scale scenery views. Experiment with these options in the wireframe preview before computing the ray-traced image. OTHER CONSIDERATIONS LOADING DEMs - Full sized one degree DEMs are enormous ASCII files of up to 10 MBytes size which must be translated byte by byte into the binary values usable by the software. Don't be alarmed at the time it might take to translate a full sized DEM and compute an overhead map. The smaller 7.5' DEMs load much more quickly and require much less memory. It is recommended that you use only 7.5' DEMs if memory is short. LOADING DTMs - DTM files on the NASA CDROM are named as "tg00n000.img" or "tg00s000.img" where "00n" or "00s" are degrees latitude (north or south) and "000" is degrees west longitude. The CDROM also contains digital photographic images of the surface of Mars named as "mg00n000.img" or "mg00s000.img." Don't confuse these photo files with the digital topographic map files. DTM files are binary files (unlike the ASCII DEMs) and are easily digested by the 3-DEM software. SCENE AREA AND RESOLUTION - Scene projections are normally computed using a 128 by 128 point grid of data from the overhead map. However, if you choose a 4X area scene and background projection, the scene is computed using a 256 by 256 point data grid for maximum resolution of fine landscape detail. This mode produces marvelous projections, but it requires about four times the memory and four times as much computing time. You might try the lower resolution modes first before you decide to commit the time required for this high resolution mode. SPEED - Everyone wants more speed. But please take into account that 3-DEM is actually computing two separate ray-traced images, one for the left eye and one for the right eye. To improve speed, keep your image window to a reasonable size and rely on the smaller foreground projections. A 1024 by 768 background projection will take a LONG TIME to compute. If you want to try something like this, I suggest that you allow 3-DEM to run in the background while you do other things. MEMORY - More is better. 3-DEM manipulates large amounts of data in memory. Using virtual memory for these processes is workable, but slow. And you may be alarmed by the gyrations of your disk drive. If you have 16 MBytes of memory, 3-DEM will never need virtual memory - even for one degree DEMs. SOURCES OF DATA DEM files are available via ftp for most of the United States and many other areas of the globe. Spectrum.xerox.com has a good selection of high resolution 7.5' DEM files for ftp. The USGS offers a large selection of one degree DEM files for ftp from edcftp.cr.usgs.gov. Also try http://sun1.cr.usgs.gov/doc/edchome/ndcdb/ndcdb.html. Choose "1:250,000 Scale Digital Elevation Model (DEM)", and then "FTP by State". You will get a state listing of available maps. A good choice is Grand Canyon East in the Arizona listing. Be sure to download the compressed version. The uncompressed DEM is about 10 MB! You will need gzip to uncompress files from these USGS sites. DTM files for Martian landscapes are available on NASA CDROM. Volume 7 of the 14 Volume Mars Digital Image Map collection contains the Digital Topographic Map of the entire surface of Mars. This CDROM is available for a modest price from the National Space Science Center. Contact request@nssdca.gsfc.nasa.gov to request a copy of the NSSDC CDROM catalog. DTM files for Martian landscapes are also available on line at http://cdwings.JPL.NASA.GOV:80/jukebox/viking/vo_2007/. Here you will see a large group of folders with names beginning with the letters "mg" and "tg". Always choose a "tg" folder to get digital maps ("mg" files are photo images). Within each folder are a series of files with names like "tgxxNxxx.img" or "tgxxS.xxx.img" where xxN or xxS are degrees north or south latitude, and "xxx" is degrees west longitude. The following files are good choices: tg15S052.img Valles Marineras area tg00N067.img Valles Marineras area tg45S010.img Crater Lohse tg45S270.img Crater Krishtofovich tg45N070.img Crater Tanais Your best approach is to know in advance the latitude and longitude of a feature you wish to explore, and then select the appropriate map for downloading. REPORTING BUGS - Please report any bugs or send any questions to rshorne@delphi.com. I'm also interested in any comments or suggestions for improvement of 3-DEM. SOURCE CODE - C++ Source code for this program is available for anyone who wishes to experiment on their own. All I ask is that you agree not to make commercial use of the source code. To receive source code send an email request, including a statement that the code will not be used for commercial purposes, to rshorne@delphi.com. Richard Horne